<template>
    <view>
        <web-view :src="vr"></web-view>
    </view>
</template>

<script>
import cardlist from '@/ymq_canyino2o/dist/cardlist/index';
import gettel from '@/ymq_canyino2o/dist/gettel/index';
var app = getApp();
var screenWidth = 0;
var screenHeight = 0;
var screenWidth1 = 0;
var screenHeight1 = 0;
var screenWidth2 = 0;
var screenHeight2 = 0;
export default {
    components: {
        cardlist,
        gettel
    },
    data() {
        return {
            vr: '',
            tempFilePath: ''
        };
    },
    onLoad: function (e) {
        console.log(e);
        app.globalData.setNavigationBarColor(this);
        console.log(uni.getStorageSync('vr'));
        this.setData({
            vr: uni.getStorageSync('vr')
        });
    },
    onReady: function () {},
    onShow: function () {},
    onHide: function () {},
    onUnload: function () {},
    onPullDownRefresh: function () {},
    onReachBottom: function () {},
    onShareAppMessage: function () {},
    methods: {
        canvas: function (e) {
            var that = this;
            console.log(e);
            uni.canvasToTempFilePath({
                x: 0,
                y: 0,
                width: 400,
                height: 200,
                destWidth: 400,
                destHeight: 600,
                canvasId: 'firstCanvas',
                success: function (e) {
                    console.log(e);
                    uni.saveImageToPhotosAlbum({
                        filePath: e.tempFilePath,
                        success: function (e) {
                            console.log(e);
                            uni.showToast({
                                title: '保存成功',
                                icon: 'success',
                                duration: 2000
                            });
                        }
                    });
                    that.setData({
                        tempFilePath: e.tempFilePath
                    });
                },
                fail: function (e) {
                    console.log(e);
                }
            });
        }
    }
};
</script>
<style>
@import './car.css';
</style>
